package org.smr.ministore.dao;

import org.apache.ibatis.annotations.Param;
import org.smr.ministore.entities.Authority;
import org.smr.ministore.entities.Role;
import org.smr.ministore.entities.User;
import org.apache.ibatis.annotations.Mapper;
import org.blade.dao.base.BaseMapper;
import org.blade.dao.base.PageQueryMapper;

import java.util.List;

/**
*
**/
@Mapper
public interface UserMapper extends BaseMapper<Long, User>,PageQueryMapper<Long,User> {

    /**
     * 根据用户名查询
     * @param userName
     * @return
     */
    User selectByUserName(@Param("userName") String userName );

    /**
     * 根据用户名查询用户数
     * @param userName
     * @return
     */
    Long getCountByUserName(@Param("userName") String userName);

    /**
     * 根据移动电话查询
     * @param mobilePhone
     * @return
     */
    User selectByMobile( @Param("mobilePhone") String  mobilePhone );

}
